UE5 Quest System
This page is part of the documentaiton for my UE5 Quest System

Quest Actors

UE5 Quest System Version: 2.0

    What are Quest Actors?

    A quest actor refers to any actor linked to a quest. We connect actors to quests using actor tags, which we also specify in our data table. These tags help define various quest aspects, like the 'accept at,' 'complete at,' and each of our Quest Objectives that use a target.

    It's important to note that although this system uses actors, it's not restricted to them. If you prefer, you can design a complete quest using just the UI, from start to end, including the objectives! There is an example of a UI driven quest in the demo world.

    Also make sure to check out the Working in Blueprint page, where I will show you how you can progress a quest from start to finish without interacting with an actor.

    Most Common Questions

    Timmy DYNooO0oo! I see the quest indicator, but it is not behaving like a quest actor, what is happening?!

    If you see the indicator but the actor is not acting like a quest actor (where you can't interact with it or it does not give credit), then this means your actor did not check in with the Quest World Helper, which is how they are associated with quests. We talk about how to check in actors in one of the upcoming sections of this page.

    If you do not check in your actor you can alternatively use the rescanning options. For accept and complete at actors the rescan option can be found in the Quest Options section. For quest objectives the rescan option can be found in the Objective Options.

    These rescanning options are expensive to use, so you should use them sparingly (or not at all). Instead of using rescanning I recommend instead calling the checkInActor on the Quest World Helper for the highest level of performance. This has the exact same effect but instead of the quest system constantly searching for new actors, you are just telling the quest system about the new actor when it is spawned.

    How identifying quest actors works

    The World Quest Helper in our system plays a key role in identifying quest actors within the level by using a scanning method. When it finds an actor that's part of a quest, it attaches our actor component (see below) to that actor. This initial scan happens on begin play.

    Additionally, if you've enabled any rescanning options in your quest or objective settings, it will keep scanning for actors relevant to those specific quests at the rate you set for Rescan For New Actors Speed on the AC_QuestSystem_PlayerControllercomponent you attached to your player controller during the installation.

    While the ability to rescan is a nice feature to have, keep in mind that it can get expensive when over used. A more effecient approach is to use the Check In method (described next).

    Check In Method (checkInActor in BP_QuestHelper_World)

    It's important to be aware that the rescanning functionality can be resource-intensive when used frequently. Instead of relying on rescanning, I recommend using the Check In method, which is a more efficient alternative.

    To use it, after you spawn your actor, call the checkInActor function on the World Quest Helper in your world.

    As a quick recap this blueprint is added automatically by the first player controller to join the level. Its purpose is to assist with identifying and initializing our quest actor component (see below).

    Running this check in event will get all tags from the actor, and check them against the ones used in available quests. If you are manually adding your tags make sure you add them before you call the check in actor event.

    In our demo world the cupcakes that respawn when you destroy them use the CheckIn method after spawning. You can find the files for these in the Demo/MapHelpers/ folder.

    Actor Component (AC_QuestSystem_Actor)

    The actor component is added to actors automatically by the World Quest Helper (through rescanning or CheckIn method) acts as the central handler for all interactions between the actor and our quest system. When needed it will also create a sphere collision which it attaches to the actor, enabling the detection of nearby players for various interactions such as accepting and completing quests as well as objectives like our Interact, Item Turn In, as well as the Travel To Quest Objectives.

    Additionally, this actor component monitors the actor it is attached to for damage and destruction. This functionality is crucial for attributing credit to players for quests that involve the 'Destroy' objective type, ensuring players receive the appropriate credit for completing related Quest Objectives.

    You can learn more about this component, as well as the World Quest Helper blueprint in the System Overview section.

    Actor Options (BPI_Quest_Actor_Options)

    In the previous version we used a component if we wanted to do things like tweak the indicator positioning, scale, etc. In this version it has changed to a blueprint interface called BPI_Quest_Actor_Options. To use just add this blueprint interface to your actor. This will implement the following functions:

    getName - This function is used to display the name of the actor in the title bar of the Quest Window. If getName isn't utilized, the quest type will be shown instead in the title bar.
    getIndicatorOptions - This function allows you to specify a location, rotation, and scale adjustment for any quest indicator displayed on this actor, enhancing the visual guidance for the players.
    getSphereRadiusOverride - If you want to change the sphere radius value of the sphere collision created on this actor, this is where you can provide a new radius value. The default radius is set to 150. Keep in mind this will adjust the radius for anything using this overlap, including interacting with the quest actor. If you are increasing the radius for a Travel To Quest Objective you should instead use the Travel Helper blueprint, which you can attach to the actor, or place next to them.
    getCaptureTransformOptions - This function allows you to set the relative location and add to the relative rotation for the scene capture component that displays the actor in the quest window. Keep in mind location will overwrite the default of [75,0,15] and the rotation you set is added to the current rotation. Scale is not used in this transform. Moreover, you have the option to display an arrow, which indicates the camera's position, aiding in the placement of the scene capture component during development. Learn more about this scene capture component on the Quest Helpers page.
    onObjectiveProgress - This event notifies the actor when a player makes progress on a quest objective that the actor is associated with. This notification allows you to execute specific actions, such as hiding or disabling the actor temporarily, once the player has been credited for their progress.
    onActorHelperAttached - This event is triggered when the actor helper component is attached to the actor, informing your actor of this attachment. Because this component is added dynamically post begin play, you can use this event to establish a reference to the actor component once it is loaded onto your actor.
    This documentation and asset version are new. If you encounter any bugs or if anything doesn't make sense, please let me know.